﻿//----------------------------------------------------------------------------------------------------
// The IGameState base class for game states
//----------------------------------------------------------------------------------------------------

package HG.GameStates
{
	import flash.display.*;
	
	import HG.GameService;
	
	public class IGameState
	{
		var m_movie:MovieClip;
		var m_stateName:String;
		
		//----------------------------------------------------------------------------------------------------
		public function IGameState()
		{
			m_stateName = "None";
		}
		
		//----------------------------------------------------------------------------------------------------
		public function Begin()
		{
			var visualManager = GameService.GetInstance().GetVisualManager();
			m_movie = visualManager.GetGameArea()[m_stateName];
			
			if (m_movie)
				m_movie.gotoAndPlay('in');
		}
		
		//----------------------------------------------------------------------------------------------------
		public function End()
		{
			if (m_movie)
				m_movie.gotoAndPlay('out');
		}
		
		//----------------------------------------------------------------------------------------------------
		public function OnTick(DetaTime:Number)
		{
			
		}
		
		//----------------------------------------------------------------------------------------------------
	}

}